Skip to content

fix bug that saved optimal model path in test_analyzer_save_model con…#17555

Merged
lijianshe02 merged 3 commits intoPaddlePaddle:developfrom
lijianshe02:develop
May 22, 2019
Merged

fix bug that saved optimal model path in test_analyzer_save_model con…#17555
lijianshe02 merged 3 commits intoPaddlePaddle:developfrom
lijianshe02:develop

Conversation

@lijianshe02
Copy link
Contributor

…flict with test_analyzer_small_dam test=develop

…flict with test_analyzer_small_dam test=develop
SetConfig(&cfg);
cfg.SetModel(FLAGS_infer_model + "/__model__", FLAGS_infer_model + "/param");
std::string optimModelPath = FLAGS_infer_model + "/saved_optim_model";
std::string optimModelPath = FLAGS_infer_model + "/only_for_save_test";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个名字能健壮一点么,不然下次别的单测又拷贝了一份,就会出错了。
能加时间戳么,可以参考 https://github.com/PaddlePaddle/Paddle/pull/17172/files
image

cur_file_name.substr(0, cur_file_name.find_last_of("."));
std::string optimModelPath =
FLAGS_infer_model +
saved_folder; // if reuse this code, ensure the path being unique
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不要在末尾加这么长的注释,看起来太难看了。直接在前面另起一行。还可以节省一行code。

Copy link
Contributor

@tensor-tang tensor-tang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lijianshe02 lijianshe02 merged commit daf8896 into PaddlePaddle:develop May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants